import Vue from 'vue'
import App from './App.vue'
import router from './router'
import audio from './lib/audio'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(audio)

import './plugins/element.js'
// 导入字体图标
import './assets/fonts/iconfont.css'
// 导入全局样式表
import './assets/css/global.css'

import axios from 'axios'
// 配置 后台项目请求的跟路径
axios.defaults.baseURL = 'http://localhost:9091'
axios.interceptors.request.use(config => {
  // console.log(config)
  config.headers.Authorization = window.sessionStorage.getItem('token')
  // 在最后必须 return config
  return config
})
Vue.prototype.$http = axios

Vue.config.productionTip = false


Vue.use(ElementUI);

// new Vue({
//   el: '#app',
//   render: h => h(App)
// });
new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
